1
|
|
|
import { graphql } from "gatsby" |
2
|
|
|
import React, { Component } from "react" |
3
|
|
|
|
4
|
|
|
import SEO from "../components/seo" |
5
|
|
|
import Sponsor from "../components/sponsor" |
6
|
|
|
import Layout from "../layouts/index" |
7
|
|
|
|
8
|
|
|
class SponsorsPage extends Component { |
9
|
|
|
render() { |
10
|
|
|
const { goldSponsors, silverSponsors, bronzeSponsors } = this.props.data |
11
|
|
|
return ( |
12
|
|
|
<Layout> |
13
|
|
|
<SEO |
14
|
|
|
lang="nl-BE" |
15
|
|
|
title="Sponsors" |
16
|
|
|
description="Overzicht van de sponsors die KCVV Elewijt steunen." |
17
|
|
|
path={this.props.location.pathname} |
18
|
|
|
/> |
19
|
|
|
<div className={`sponsors-overview__wrapper limited-width_wrapper`}> |
20
|
|
|
<section className={`sponsors-overview__section sponsors-overview__section--top`}> |
21
|
|
|
{goldSponsors.edges.map(({ node }, i) => { |
22
|
|
|
const website = (node.field_website && node.field_website.uri) || `` |
23
|
|
|
return ( |
24
|
|
|
<Sponsor |
25
|
|
|
key={i} |
26
|
|
|
localFile={node.relationships.field_media_image.relationships.field_media_image.localFile} |
27
|
|
|
uri={website} |
28
|
|
|
/> |
29
|
|
|
) |
30
|
|
|
})} |
31
|
|
|
</section> |
32
|
|
|
<section className={`sponsors-overview__section sponsors-overview__section--middle`}> |
33
|
|
|
{silverSponsors.edges.map(({ node }, i) => { |
34
|
|
|
const website = (node.field_website && node.field_website.uri) || `` |
35
|
|
|
return ( |
36
|
|
|
<Sponsor |
37
|
|
|
key={i} |
38
|
|
|
localFile={node.relationships.field_media_image.relationships.field_media_image.localFile} |
39
|
|
|
uri={website} |
40
|
|
|
/> |
41
|
|
|
) |
42
|
|
|
})} |
43
|
|
|
</section> |
44
|
|
|
<section className={`sponsors-overview__section sponsors-overview__section--bottom`}> |
45
|
|
|
{bronzeSponsors.edges.map(({ node }, i) => { |
46
|
|
|
const website = (node.field_website && node.field_website.uri) || `` |
47
|
|
|
return ( |
48
|
|
|
<Sponsor |
49
|
|
|
key={i} |
50
|
|
|
localFile={node.relationships.field_media_image.relationships.field_media_image.localFile} |
51
|
|
|
uri={website} |
52
|
|
|
/> |
53
|
|
|
) |
54
|
|
|
})} |
55
|
|
|
</section> |
56
|
|
|
</div> |
57
|
|
|
</Layout> |
58
|
|
|
) |
59
|
|
|
} |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
export const pageQuery = graphql` |
63
|
|
|
query { |
64
|
|
|
goldSponsors: allNodeSponsor( |
65
|
|
|
filter: { promote: { eq: true }, status: { eq: true }, field_type: { in: ["crossing"] } } |
66
|
|
|
sort: { fields: title, order: ASC } |
67
|
|
|
) { |
68
|
|
|
edges { |
69
|
|
|
node { |
70
|
|
|
title |
71
|
|
|
field_type |
72
|
|
|
field_website { |
73
|
|
|
uri |
74
|
|
|
} |
75
|
|
|
relationships { |
76
|
|
|
field_media_image { |
77
|
|
|
field_media_image { |
78
|
|
|
alt |
79
|
|
|
} |
80
|
|
|
relationships { |
81
|
|
|
field_media_image { |
82
|
|
|
localFile { |
83
|
|
|
...KCVVFluid480 |
84
|
|
|
} |
85
|
|
|
} |
86
|
|
|
} |
87
|
|
|
} |
88
|
|
|
} |
89
|
|
|
} |
90
|
|
|
} |
91
|
|
|
} |
92
|
|
|
silverSponsors: allNodeSponsor( |
93
|
|
|
filter: { promote: { eq: true }, status: { eq: true }, field_type: { in: ["green", "white"] } } |
94
|
|
|
sort: { fields: title, order: ASC } |
95
|
|
|
) { |
96
|
|
|
edges { |
97
|
|
|
node { |
98
|
|
|
title |
99
|
|
|
field_type |
100
|
|
|
field_website { |
101
|
|
|
uri |
102
|
|
|
} |
103
|
|
|
relationships { |
104
|
|
|
field_media_image { |
105
|
|
|
field_media_image { |
106
|
|
|
alt |
107
|
|
|
} |
108
|
|
|
relationships { |
109
|
|
|
field_media_image { |
110
|
|
|
localFile { |
111
|
|
|
...KCVVFluid480 |
112
|
|
|
} |
113
|
|
|
} |
114
|
|
|
} |
115
|
|
|
} |
116
|
|
|
} |
117
|
|
|
} |
118
|
|
|
} |
119
|
|
|
} |
120
|
|
|
bronzeSponsors: allNodeSponsor( |
121
|
|
|
filter: { promote: { eq: true }, status: { eq: true }, field_type: { in: ["training", "panel", "other"] } } |
122
|
|
|
sort: { fields: title, order: ASC } |
123
|
|
|
) { |
124
|
|
|
edges { |
125
|
|
|
node { |
126
|
|
|
title |
127
|
|
|
field_type |
128
|
|
|
field_website { |
129
|
|
|
uri |
130
|
|
|
} |
131
|
|
|
relationships { |
132
|
|
|
field_media_image { |
133
|
|
|
field_media_image { |
134
|
|
|
alt |
135
|
|
|
} |
136
|
|
|
relationships { |
137
|
|
|
field_media_image { |
138
|
|
|
localFile { |
139
|
|
|
...KCVVFluid480 |
140
|
|
|
} |
141
|
|
|
} |
142
|
|
|
} |
143
|
|
|
} |
144
|
|
|
} |
145
|
|
|
} |
146
|
|
|
} |
147
|
|
|
} |
148
|
|
|
} |
149
|
|
|
` |
150
|
|
|
|
151
|
|
|
export default SponsorsPage |
152
|
|
|
|